namespace Mediator.Framework.Runtime.QueryProcessing.Operations
{
    public class Value
    {
        public Operation CreatedBy
        { 
            get; private set; 
        }
        
        public QueryPlan InPlan
        {
            get; private set;
        }
        
        public string Name
        {
            get; private set;
        }

        public Value(QueryPlan plan, Operation createdBy):this(plan,createdBy,null)
        {
            
        }

        public Value(QueryPlan plan,Operation createdBy,string name)
        {
            CreatedBy = createdBy;
            InPlan = plan;
            Name = plan.GetValueName(name);

            InPlan.AddValue(this);
        }
    }
}